<!DOCTYPE html>
<html>
<head>
    <title>代理商业务员</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">业务员名称：</div>
            <div style="float: left;width:160px;margin-right: 10px;">
                    <input type="text" class="form-control" v-model="q.busName" @keyup.enter="query" placeholder="业务员名称">
                </div>
            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">业务员手机号码：</div>
            <div style="float: left;width:160px;margin-right: 10px;">
                    <input type="text" class="form-control" v-model="q.busPhone" @keyup.enter="query" placeholder="业务员手机号码">
                </div>
                <a class="btn btn-primary" @click="query">查询</a>

        </div>

        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
														                    <!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">业务员编码</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input type="text" class="form-control" v-model="agentShopBus.busSn" placeholder="业务员编码"/>-->
                        <!--</div>-->
                    <!--</div>-->
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">业务员名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="agentShopBus.busName" placeholder="业务员名称"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">业务员手机</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="agentShopBus.busPhone" placeholder="业务员手机"/>
                        </div>
                    </div>
											                    <!--<div class="form-group">-->
                        <!--<div class="col-sm-2 control-label">所属代理商</div>-->
                        <!--<div class="col-sm-10">-->
                            <!--<input type="text" class="form-control" v-model="agentShopBus.busParent" placeholder="所属代理商"/>-->
                        <!--</div>-->
                    <!--</div>-->

                    <div class="form-group">
                        <div class="col-sm-2 control-label">所属代理商</div>
                        <div style="vertical-align: middle;display: table-cell!important;">
                            <div id="agentParent" style="float: left" class="col-sm-10">
                                <input type="text" class="form-control" disabled="disable" v-model="agentShopBus.busParent"/>
                            </div>
                            <div class="col-sm-2">
                                <a class="btn btn-primary"  @click="addAgent">&nbsp;选择</a>
                            </div>
                        </div>
                    </div>

											                    <div class="form-group">
                        <div class="col-sm-2 control-label">佣金百分比</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="agentShopBus.busRatio" placeholder="佣金百分比"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">可打开所属机柜</div>
                        <div class="col-sm-10">
                            <select class="form-control" v-model="agentShopBus.busOpen" @keyup.enter="query" >
                                <option value="0">是</option>
                                <option value="1">否</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">状态</div>
                        <div class="col-sm-10">
                            <select class="form-control" v-model="agentShopBus.status" @keyup.enter="query" >
                                <option value="0">正常</option>
                                <option value="1">禁用</option>
                            </select>
                        </div>
                    </div>
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>

                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                    <div class="modal-dialog" role="document">
                        <form class="form-horizontal">
                            <div class="modal-content" style="width: 750px;">
                                <div style="padding: 15px;">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                                        <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">选择代理商</p>
                                    </div>
                                </div>
                                <div class="modal-body">
                                    <div style="margin-bottom: 15px">
                                        <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商状态：</div>
                                        <div style="float: left;width:70px;margin-right: 10px;">
                                            <select class="form-control" v-model="qcx.status" @keyup.enter="queryBus" id="s_id">
                                                <option value="0">正常</option>
                                                <option value="1">禁止</option>
                                            </select>
                                        </div>

                                        <div style="float: left;margin-left:10px;height:34px;line-height:34px;">代理商名称：</div>
                                        <div style="float: left;width:120px;margin-right: 10px;">
                                            <input type="text" class="form-control" v-model="qcx.shopName" @keyup.enter="queryBus" placeholder="请输入内容">
                                        </div>
                                        <div style="float: left;margin-left:10px;height:34px;line-height:34px;">手机号码：</div>
                                        <div style="float: left;width:120px;margin-right: 10px;">
                                            <input type="text" class="form-control" v-model="qcx.shopPhone" @keyup.enter="queryBus" placeholder="请输入内容">
                                        </div>

                                        <a class="btn btn-primary" @click="queryBus">搜索</a>
                                    </div>

                                    <table id="jqGridAdd" style="width: 100%;"></table>
                                    <div id="jqGridPager1"></div>
                                    <!--<a class="btn btn-primary" @click="showAgent" style="margin-left: 290px;margin-top: 10px">确定</a>-->
                                </div>
                            </div>
                        </form>
                    </div>
                </div>

            </div>
        </form>
    </div>

    <!-- 商户弹窗 -->
    <div class="modal fade" id="myModalSH" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <form class="form-horizontal">
                <div class="modal-content" style="width: 750px;">
                    <div style="padding: 15px;">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                            <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">商户信息</p>
                        </div>
                    </div>
                    <div class="modal-body">
                        <div style="margin-bottom: 15px">

                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">商户名称：</div>
                            <div style="float: left;width:120px;margin-right: 10px;">
                                <input type="text" class="form-control" v-model="qsh.name" @keyup.enter="queryAdminXZ" placeholder="请输入内容">
                            </div>
                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">商户地址：</div>
                            <div style="float: left;width:120px;margin-right: 10px;">
                                <input type="text" class="form-control" v-model="qsh.address" @keyup.enter="queryAdminXZ" placeholder="请输入内容">
                            </div>

                            <a class="btn btn-primary" @click="querysh">搜索</a>
                        </div>

                        <table id="jqGridAddSH" style="width: 100%;"></table>
                        <div id="jqGridPagerSH" style="width: 100%;"></div>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <!-- 代理商统计 -->
    <div class="modal fade" id="myModaldls" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <form class="form-horizontal">
                <div class="modal-content" style="width: 750px;">
                    <div style="padding: 15px;">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <div style="padding: 20px 0;border-bottom: 1px solid #E2E5ED;">
                            <p style="font-size: 14px;color: #4c4948;float: left;margin: 0!important;">业务员订单统计</p>
                        </div>
                    </div>
                    <div class="modal-body">
                        <div style="margin-bottom: 15px">

                            <div style="float: left;margin-left:10px;height:34px;line-height:34px;">订单编号：</div>
                            <div style="float: left;width:120px;margin-right: 10px;">
                                <input type="text" class="form-control" v-model="dlstj.orderSn" @keyup.enter="queryAdminXZ" placeholder="请输入内容">
                            </div>

                            <a class="btn btn-primary" @click="queryywy">搜索</a>
                        </div>

                        <table id="jqGridAdddls" style="width: 100%;"></table>
                        <div id="jqGridPagerdls" style="width: 100%;"></div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/sys/agentshopbus.js?_${.now?long}"></script>
</body>
</html>